package com.ruoyi.abuwx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.abuwx.mapper.AbuwxScheduleMapper;
import com.ruoyi.abuwx.domain.AbuwxSchedule;
import com.ruoyi.abuwx.service.IAbuwxScheduleService;

/**
 * 进度Service业务层处理
 * 
 * @author tang
 * @date 2022-07-12
 */
@Service
public class AbuwxScheduleServiceImpl implements IAbuwxScheduleService 
{
    @Autowired
    private AbuwxScheduleMapper abuwxScheduleMapper;

    /**
     * 查询进度
     * 
     * @param id 进度主键
     * @return 进度
     */
    @Override
    public AbuwxSchedule selectAbuwxScheduleById(Long id)
    {
        return abuwxScheduleMapper.selectAbuwxScheduleById(id);
    }

    /**
     * 查询进度列表
     * 
     * @param abuwxSchedule 进度
     * @return 进度
     */
    @Override
    public List<AbuwxSchedule> selectAbuwxScheduleList(AbuwxSchedule abuwxSchedule)
    {
        return abuwxScheduleMapper.selectAbuwxScheduleList(abuwxSchedule);
    }

    /**
     * 新增进度
     * 
     * @param abuwxSchedule 进度
     * @return 结果
     */
    @Override
    public int insertAbuwxSchedule(AbuwxSchedule abuwxSchedule)
    {
        abuwxSchedule.setCreateTime(DateUtils.getNowDate());
        return abuwxScheduleMapper.insertAbuwxSchedule(abuwxSchedule);
    }

    /**
     * 修改进度
     * 
     * @param abuwxSchedule 进度
     * @return 结果
     */
    @Override
    public int updateAbuwxSchedule(AbuwxSchedule abuwxSchedule)
    {
        abuwxSchedule.setUpdateTime(DateUtils.getNowDate());
        return abuwxScheduleMapper.updateAbuwxSchedule(abuwxSchedule);
    }

    /**
     * 批量删除进度
     * 
     * @param ids 需要删除的进度主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxScheduleByIds(Long[] ids)
    {
        return abuwxScheduleMapper.deleteAbuwxScheduleByIds(ids);
    }

    /**
     * 删除进度信息
     * 
     * @param id 进度主键
     * @return 结果
     */
    @Override
    public int deleteAbuwxScheduleById(Long id)
    {
        return abuwxScheduleMapper.deleteAbuwxScheduleById(id);
    }
}
